.so ../bk-macros
.TH "bk ignore" "\*[BKVER]" %E% "\*(BC" "\*(UM"
.SH NAME
bk ignore \- ignore shell glob patterns
.SH SYNOPSIS
.B bk ignore 
.ARG glob
.[ARG] glob " .\|.\|."
.SH DESCRIPTION
.LP
.B bk ignore
tells \*(BK to ignore specified files when looking for extra files
that are not under revision control.
This affects the output of
.B bk gfiles \-x
and all commands that use its output, such as 
.B bk citool
and 
.BR "bk extras" .
.LP
Typical things to ignore are object files, core files,
.BR "a.out" ,
.BR "*.exe" ,
and the like.
.LP
Patterns that do not contain a slash (`\fB/\fP') character are matched
against the basename of the file; patterns containing a slash
are matched against the pathname of the file relative to the root
of the repository.
Using '\fB.\|/\fP' at the start of a pattern means the pattern applies
only to the repository root.
.LP
For example, if you always want to ignore files named
.B JUNK
regardless of which directory they are in, you can say
.DS
bk ignore JUNK
.DE
This matches 
.B JUNK
and
.B sub/dir/JUNK
but not
.BR JUNK-PRECIOUS .
.LP
If you want to match a file in just one subdirectory, you can do
.DS
bk ignore sub/directory/this_one
.DE
which matches
.B sub/directory/this_one
but not
.BR other_dir/this_one .
.LP
If you want to ignore just the
.B JUNK
file at the root of the repository, you can do
.DS
bk ignore ./JUNK
.DE
which matches
.B JUNK
but not
.BR sub/dir/JUNK .
.LP
You can also prune certain subdirectories of your repository by appending
\*(lq\fB \-prune\fP\*(rq to the directory path; no BitKeeper operations
will descend into that directory.
.DS
bk ignore 'sub/dir/build -prune'
.DE
.B Note:
It's important to use the quotes as shown when using
.Q \-prune
because each command argument is treated as a separate pattern.
You may use
.Q \-prune
only with directory paths that are relative to the root of the repository.
.LP
Pruning large non-revision controlled directory trees that appear in
your repository can significantly improve performance in some cases.
.LP
With no arguments,
.B bk ignore
shows the current ignore list.
.LP
The ignore list is stored in the file
.BR BitKeeper/etc/ignore .
You may edit this file if you wish; the format is simply one glob per line.
Editing the ignore file is the only way to remove entries from the list.
.LP
The default ignore list is
.DS
PENDING -prune
BitKeeper/log -prune
BitKeeper/tmp -prune
BitKeeper/writer -prune
BitKeeper/readers -prune
BitKeeper/etc/level
BitKeeper/etc/csets-in
BitKeeper/etc/csets-out
.DE
The following additions are suggested:
.DS
core
*.o
*.swp
*.a
*.exe
*~
*.rej
*.orig
.DE
.SH ADVANCED USAGE
You may manually add additional ignore patterns on a per user basis.
For example, if you have a tendency to have a file called "notes"
that you never want to check in, and you also use .xxx as your junk
files, then do this:
.DS
$ echo notes >> "`bk dotbk`/ignore"
$ echo '*.xxx' >> "`bk dotbk`/ignore"
.DE
.SH SEE ALSO
.LP
.SA citool
.SA extras
.SA gfiles
.SA status
.SH CATEGORY
.B Admin
